Simulation 3

Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 - 3W + 2A + 10Z + Z(10 + 5W + 2AW))]\)
##        W                   A               Z                Y         
##  Min.   :-3.777088   Min.   :0.000   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.646166   1st Qu.:0.584   1st Qu.:0.0000   1st Qu.:0.0000  
##  Median : 0.003599   Median :1.975   Median :0.0000   Median :0.0000  
##  Mean   : 0.007583   Mean   :2.100   Mean   :0.4858   Mean   :0.2532  
##  3rd Qu.: 0.673761   3rd Qu.:3.386   3rd Qu.:1.0000   3rd Qu.:1.0000  
##  Max.   : 3.725200   Max.   :5.000   Max.   :1.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.464   2.843   2.753   4.200   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.8976  2.2133  2.2891  3.6245  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.3664  1.7641  1.8995  3.0844  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.152   1.499   2.536   5.000

n = 200

CV HAL

results

## CV selected lambda (from one sample): 0.0041344192189172

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00502291469916564
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 0.000965685169251822
##  which is 0.233572146909012 * lambda_CV

n = 500

CV HAL

results

## CV selected lambda (from one sample): 0.00179663135270864

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00167069905743632
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 0.000291732819942546
##  which is 0.162377673918872 * lambda_CV

1000 repetition

## The average of unsersmoothed lambda (from 1000 sample): 0.000270475505996292
##  which is 0.155768441258726 * the average of 1000 lambda_CV
## z=1:

## z=0:

Oevr a grid of lambda scalers

n = 1000

CV HAL

results

## CV selected lambda (from one sample): 0.000284242765357572

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00072537755501008
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 4.61546787671019e-05
##  which is 0.162377673918872 * lambda_CV